import {createStore,applyMiddleware} from 'redux';
import thunk from 'redux-thunk';
let initState={
    list:{}
}
let reducer=(state=initState,actions)=>{
   let  newState=JSON.parse(JSON.stringify(state));
   switch(actions.type){
       case "SET_LIST":
        newState.list=actions.data;
        return newState;
           default:
               return state;

   }
}
export default createStore(reducer,applyMiddleware(thunk));